<?php

namespace App\Http\Controllers\DesignPattern\Creational\Behavioral;

use App\Model\DesignPattern\Creational\Behavioral\ChainOfResponsibility\Bank;
use App\Model\DesignPattern\Creational\Behavioral\ChainOfResponsibility\Bitcoin;
use App\Model\DesignPattern\Creational\Behavioral\ChainOfResponsibility\PayPal;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ChainOfResponsibilityController extends Controller
{
    public function index()
    {
        $bank = new Bank(100);
        $paypal = new PayPal(200);
        $bitcoin = new Bitcoin(300);

         $bank->setNext($paypal);
         $bank->pay(100);

        $paypal->setNext($bitcoin);

        return ;
    }
}
